/******************************************************************************
 * @ CompanyName : Copyright (C), 2031,  xx Information Technology Co., Ltd.
 * @ FileName    : event_schedule_config.h
 * @ Descripttion: event and schedule config
 * @ version     : 1.4
 * @ Author      : SunXin
 * @ Date        : 2021-12-27 15:47:19
 * @ LastEditTime: 2023-07-07 17:57:35
 * @ Chargelog   : 1.xxx
 ******************************************************************************/

//file declaration：Apply the event and Schedule scheduler config implementation headers
//please add new 

#ifndef __EVENT_SCHEDULE_CONFIG_H__
#define __EVENT_SCHEDULE_CONFIG_H__

#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */
/******************************************************************************/
//                          header file reference
/******************************************************************************/
// Standard includes
#include <stdio.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
// os type includes
#include "type_def.h"
// config lay includes
#include "version.h"
// debug includes
#include "log_print_config.h"
// system includes
#include "utc.h"


// Kernel includes
#ifdef _USE_RTOS_DEF_
#include "FreeRTOS.h"
#include "task.h"
#endif

// mcu bsp includes


/***********************************************************************************/
//                  CONFIG MACRO DEF           
/***********************************************************************************/
//LOG DEBUG
#define LOG_EVENT_SCHEDULE_CONFIG_ENABLE

//event queue max num def
#define ES_EVENT_QUEUE_MAX_NUM 15

//schedule queue max num def
#define ES_SCHEDULE_QUEUE_MAX_NUM 1

//create event:Maximum number of requests to create event queues
#define ES_CREATE_EVENT_REQ_QUEUE_MAX_NUM ES_EVENT_QUEUE_MAX_NUM

//del event:Maximum number of requests to delete event queues
#define ES_DEL_EVENT_REQ_QUEUE_MAX_NUM ES_EVENT_QUEUE_MAX_NUM

//create schedule:Maximum number of request to create schedule queues
#define ES_CREATE_SCHEDULE_REQ_QUEUE_MAX_NUM ES_SCHEDULE_QUEUE_MAX_NUM

//del schedule:Maximum number of schedule queues to be deleted
#define ES_DEL_SCHEDULE_REQ_QUEUE_MAX_NUM ES_SCHEDULE_QUEUE_MAX_NUM

//The maximum depth of the message queue
#define ES_MSG_QUEUE_MAX_NUM 5

/***********************************************************************************/
//                  CORE Generic type declaration           
/***********************************************************************************/


/***********************************************************************************/
//                  CORE Event Type declaration (Add and subtract)          
/***********************************************************************************/
//event:target class
typedef enum 
{
    e_ES_EVENT_TYPE_NONE,                   //target class无效
    
    //user add start...
    e_ES_EVENT_TYPE_TEST_01,                //target class（测试1）
    e_ES_EVENT_TYPE_TEST_02,                //target class（测试2）
    e_ES_EVENT_TYPE_TEST_03,                //target class（测试3）
    e_ES_EVENT_TYPE_TEST_04,                //target class（测试4）
    e_ES_EVENT_TYPE_TEST_05,                //target class（测试5）


    
    //user add end...
    e_ES_EVENT_TYPE_MAX,                    //max:dont big than this
}ENUM_ES_EVENT_TARGET_TYPE_S;



//----------------------External, internal operations create and delete cache queues---------------------------


/***********************************************************************************/
//                  CORE Program Type Declaration (Additions and deletions)            
/***********************************************************************************/
//SCHEDULE:CORE program Target class
typedef enum 
{
    e_ES_SCHEDULE_TYPE_NONE,                    //target class无效
    e_ES_SCHEDULE_TYPE_TEST_01,                 //target class（测试1）
    e_ES_SCHEDULE_TYPE_TEST_02,                 //target class（测试2）
    e_ES_SCHEDULE_TYPE_TEST_03,                 //target class（测试3）
    e_ES_SCHEDULE_TYPE_TEST_04,                 //target class（测试4）
    e_ES_SCHEDULE_TYPE_TEST_05,                 //target class（测试5）

    e_ES_SCHEDULE_TYPE_MAX,                     //target class最大
}ENUM_ES_SCHEDULE_TARGET_TYPE_S;

/***********************************************************************************/
//                  function api struct            
/***********************************************************************************/
//功能 API 类型定义
typedef struct 
{
    //get part
    uint16_t(*get_year)(void);                  // sys get current year
    uint8_t(*get_month)(void);                  // sys get current month
    uint8_t(*get_week)(void);                   // sys get current week
    uint8_t(*get_day)(void);                    // sys get current day
    uint8_t(*get_yestoday_day)(void);           // sys get current yestoday day
    uint8_t(*get_hour)(void);                   // sys get current hour
    uint8_t(*get_min)(void);                    // sys get current min
    uint8_t(*get_sec)(void);                    // sys get current sec
    uint32_t(*get_utc)(void);                   // sys get current utc
    uint32_t(*get_tick)(void);                  // sys get current tick value

}STRUCT_SYSTEM_INTERNAL_API;

/***********************************************************************************/
//                  MSG Message type and message queue           
/***********************************************************************************/



/***********************************************************************************/
//                  Function declaration           
/***********************************************************************************/



/***********************************************************************************/


#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */

#endif /* __EVENT_SCHEDULE_CONFIG_H__ */




